import React from "react";
interface propType {
    list:Object[]
}
interface stateType{
    title:string
}
interface CartType<T>{
    hobby:string[],
    sayHi(name:T):void
}
class Cart extends React.Component<propType,stateType>implements CartType<string>{
    hobby:string[]
    constructor(props:any){
        
        super(props)
        this.hobby=['11']
        this.state={
            title:"cart页面"
          
        }
    }
    sayHi(name:string){

    }
    render(): React.ReactNode {
        return(
            <fieldset>
                <legend>Cart</legend>
                <h1>{this.state.title}</h1>
            </fieldset>
        )
    }
}
export default Cart
